{
 "metadata": {
  "name": "",
  "signature": "sha256:b5f319b7b109b5da54ad8fc8bd6116afa2680f552124aa57a671285a84c9bc80"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import pandas as pd\n",
      "from pandas import  DataFrame"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [],
     "prompt_number": 82
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "d = DataFrame(columns=['xi','eta','x'])\n",
      "d.x = np.random.rand(100)\n",
      "d.xi = d.eval('2*x**2')\n",
      "d.eta =1-abs(2*d.x-1)\n",
      "d['h']=d[(d.x<0.5)].eval('eta**2/2')\n",
      "d['h2']=d[(d.x>=0.5)].eval('(2-eta)**2/2')"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [],
     "prompt_number": 83
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "%matplotlib inline"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [],
     "prompt_number": 84
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "d = DataFrame(columns=['xi','eta','x','h','h1','h2'])\n",
      "# 100 random samples\n",
      "d.x = np.random.rand(100)\n",
      "d.xi = d.eval('2*x**2')\n",
      "d.eta =1-abs(2*d.x-1)\n",
      "d.h1=d[(d.x<0.5)].eval('eta**2/2')\n",
      "d.h2=d[(d.x>=0.5)].eval('(2-eta)**2/2')\n",
      "d.fillna(0,inplace=True)\n",
      "d.h = d.h1+d.h2"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [],
     "prompt_number": 133
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "fig,ax=subplots()\n",
      "ax.plot(d.xi,d.eta,'.',alpha=.3,label='$\\eta$')\n",
      "ax.plot(d.xi,d.h,'k.',label='$h(\\eta)$')\n",
      "ax.set_aspect(1)\n",
      "ax.legend(loc=0,fontsize=18)\n",
      "ax.set_xlabel('$2 x^2$',fontsize=18)\n",
      "ax.set_ylabel('$h(\\eta)$',fontsize=18)\n",
      "fig.savefig('Conditional_expectation_MSE_Ex_005.png')"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "metadata": {},
       "output_type": "display_data",
       "png": "iVBORw0KGgoAAAANSUhEUgAAASIAAAEaCAYAAAC1l1p2AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3X14lPWZ6PHvDUwIAUuCIoQ32fWNllMkgC/QRoILLaKn\nuGpOt75V9OqgW22Pddlde+pWLqrtun+srfQgtkoqmlqqFrVK5SWEBV0QNEiMYMpBKKLRYhLeghiS\n+/zxzMTJkMDMZGael7k/1zWXM0+emec3PuHO73f/3kRVMcYYN/VyuwDGGGOByBjjOgtExhjXWSAy\nxrjOApExxnUWiIwxrvNMIBKRkSKyVkTqRORtEfleN+f9QkT+LCJviUhJtstpjEm/Pm4XIEYrcJeq\nbhWRAcAbIrJKVbdHTxCRWcA5qnquiFwMLAIucam8xpg08UyNSFUbVHVr5PlhYDswLO60bwC/iZyz\nCSgUkSFZLagxJu08E4hiichooATYFPej4cDemNfvAyOyUypjTKZ4qWkGQKRZ9gzw/UjN6IRT4l6f\nMEdFRGzeijEuUdX4f6On5KkakYiEgGeBJ1V1eRen7ANGxrweETl2AlUN7OPHP/6x62Ww72bfr6tH\nqjwTiEREgMeAd1T1oW5OewG4KXL+JUCzqn6UpSIaYzLES02zrwA3ANtEpCZy7IfAKABVXayqL4vI\nLBHZCRwB5rhTVGMMQDgcpr6+noKCAiorK1P+HM8EIlXdQAI1NFW9IwvF8bSysjK3i5AxQf5uELzv\nV19fz7p16wAnKKVKetKu8yoR0SB+L2O8ZtasWaxYsYJJkyaxatUqioqK0BSS1RaIjDEJ66opFg6H\nefTRRyksLERELBBFWSAyJjPKyso6mmLl5eUsW7as089TDUSe6TUzxnhfQUEBAJMmTeLRRx9N2+fm\nbI3IGS1gvCCIv4NB1dzc3KkpFs+a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Mz7gUdUda+InKOq\nO9NXYuMGyxGZTGsHPgROizu+CygSkcHJfJiI3Ab8EWgVkeHA9LSU0rjKmmYmo1T1CPC3XfzoHKAR\n+CR6QETCwBnAGOAJnHzSmTi9Zf+Cs6vJQjr/Ab02E+U22WWByGSdiIzDWXD9LlVtjxz7DlCjqptF\n5EJgFXAz8BfgfuAJVX0F+50NJLupJqtEpBfwMPCMqv4i5kenq+rmyPOzgHZVXR5JTE+NbNFjAsqS\n1SarRORBoAgIaze/fCKyEBiuqn+f1cIZ11iy2mSNiPxv4JCqfkdVVURGRTYHiPd3QHV2S2fcZIHI\nZIWIXIfT3FoQc/g2oF1EeovIDBHpJSLDgPOBdTHv/acsF9dkmeWITMaJyNeB7wPPici/Rg/jjIo+\nLiL/iNMb9kWcPdNbiOzjJiL/E3gn+6U22WQ5IpNRInI6sBso4MSdP5er6tUicgHwT8Cfgbdwxhxd\nFnnf/1PVp7JWYOMKC0TGGNdZjsgY4zoLRMYY11kgMsa4zgKRMcZ1FoiMMa6zQGSMcZ0FImOM6ywQ\nGWNcZ4HIGOM6C0TGGNdZIDLGuO7/A+Mu9vDOKDg6AAAAAElFTkSuQmCC\n",
       "text": [
        "<matplotlib.figure.Figure at 0x118f8b90>"
       ]
      }
     ],
     "prompt_number": 135
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "d = DataFrame(columns=['xi','eta','x','h','h1','h2'])\n",
      "# 100 random samples\n",
      "d.x = np.random.rand(100)\n",
      "d.xi = d.eval('2*x**2')\n",
      "d['eta']=(d.x<0.5)*(2*d.x)+(d.x>=0.5)*(2*d.x-1)\n",
      "d.h1=d[(d.x<0.5)].eval('eta**2/2')\n",
      "d.h2=d[(d.x>=0.5)].eval('(1+eta)**2/2')\n",
      "d.fillna(0,inplace=True)\n",
      "d.h = d.h1+d.h2"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [],
     "prompt_number": 163
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "fig,ax=subplots()\n",
      "ax.plot(d.xi,d.eta,'.',alpha=.3,label='$\\eta$')\n",
      "ax.plot(d.xi,d.h,'k.',label='$h(\\eta)$')\n",
      "ax.set_aspect(1)\n",
      "ax.legend(loc=0,fontsize=18)\n",
      "ax.set_xlabel('$2 x^2$',fontsize=18)\n",
      "ax.set_ylabel('$h(\\eta)$',fontsize=18)\n",
      "fig.savefig('Conditional_expectation_MSE_Ex_005.png')"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "metadata": {},
       "output_type": "display_data",
       "png": "iVBORw0KGgoAAAANSUhEUgAAASIAAAEaCAYAAAC1l1p2AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xt0VPW58PHvAwy5UCVQEZBQeL0UeqoIeEMEGSm0NNri\nUbPaemvRdrBnaX1tm3OOfetRl5Xanj9qKz0Iq0oUSy31glLltSgmBREa5JYGMFKEAhp8MQliohjC\n8/6xZ+IwJGQyt71n7+ezVhaZPXv2/g178szv8vx+W1QVY4xxUy+3C2CMMRaIjDGus0BkjHGdBSJj\njOssEBljXGeByBjjOs8EIhEZLiKvikidiPxdRH7QxX6/EZG3RGSziIzLdTmNMZnXx+0CxGkD7lDV\nTSLyGeANEVmhqttiO4hIGXCmqp4lIhcB84AJLpXXGJMhnqkRqWqDqm6K/v4hsA04LWG3rwOPRfdZ\nB5SIyOCcFtQYk3GeCUTxRGQkMA5Yl/DUMGBP3OO9QGluSmWMyRYvNc0AiDbLngJuj9aMjtsl4fFx\nc1RExOatGOMSVU38G+2Wp2pEIhICngaeUNWlneyyDxge97g0uu04qurbn7vvvtv1Mth7s/cX/zNl\nypS0/vY9E4hERIBHgK2q+mAXuz0P3BjdfwLQrKr7c1REY0wXiouL03q9l5pmlwDXA1tEZGN020+A\nzwGo6nxVfVFEykRkB9ACzHKnqMaYSCRCfX09xcXFzJs3j4qKCv70pz+ldCzPBCJVXU0SNTRVvTUH\nxfG0cDjsdhGyxs/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I3MlNm6wPiKTbUeBd4GTErbvBAaIyKCeHExE\nbgH+DLSJyDBgWkZKaVxlTTOTVaraApzeyVNnAo3A+7ENIhIBTgFGA4/j9CedijNa9h84dzWZy7Ff\noNdko9wmtywQmZwTkTE4C67foapHo9u+B2xU1RoRuQBYAXwH+CdwP/C4qr6EfWZ9yS6qySkR6QU8\nBDylqr+Je+qzqloT/X0EcFRVl0Y7pqdEb9FjfMo6q01OicgvgQFARLv48InIXGCYqv5rTgtnXGOd\n1SZnROR/A4dU9XuqqiLyuejNARJ9CajKbemMmywQmZwQkWtxmlv3xW2+BTgqIr1FZLqI9BKR04BR\nQHXca3+c4+KaHLM+IpN1IvIV4HbgGRH5z9hmnKzoIyLybzijYV/AuWd6K9H7uInI14CtuS+1ySXr\nIzJZJSKfBXYBxRx/58+lqnqViJwL/Bh4C9iMk3M0Nfq6f6jq73NWYOMKC0TGGNdZH5ExxnUWiIwx\nrrNAZIxxnQUiY4zrLBAZY1xngcgY4zoLRMYY11kgMsa4zgKRMcZ1FoiMMa6zQGSMcd3/Byb9hjgU\neI/TAAAAAElFTkSuQmCC\n",
       "text": [
        "<matplotlib.figure.Figure at 0x120b73b0>"
       ]
      }
     ],
     "prompt_number": 162
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [],
     "language": "python",
     "metadata": {},
     "outputs": []
    }
   ],
   "metadata": {}
  }
 ]
}